1
bash
This demonstrates various operations on a Bash associative array (dictionary), including accessing, retrieving, and manipulating key-value pairs.
declare -A sounds sounds["dog"]="woof" echo "${sounds[dog]}" # Dog's sound echo "${sounds[@]}" # All values echo "${!sounds[@]}" # All keys echo "${#sounds[@]}" # Number of elements unset sounds[dog] # Delete dog
bash internaldata manipulationsarray manipulationsassociative array (dictionary)